package org.bt4girls.oauth.mappy;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.bt4girls.common.model.oauth.TbUserPermission;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface TbUserPermissionMapper {
    int deleteByPrimaryKey(Long id);

    TbUserPermission selectByPrimaryKey(Long id);

    @ResultMap("BaseResultMap")
    @Select("SELECT " +
            "id,uid,permission_id,permission " +
            "FROM tb_user_permission " +
            "WHERE uid = #{}")
    List<TbUserPermission> selectPermissionByUid(@Param("uid") Long uid);
}